import React from 'react';
import { StatusBar, StyleSheet, View } from 'react-native';

export default class ShortVideoPage extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
            data: []
        };
    }

    componentDidMount() {
        // this.onRefreshing()
    };

    componentWillUnmount() {
    }

    onRefreshing = () => setTimeout(() => {
        this.setState({
            data: [
                {
                    thumbnail: 'https://p3.pstatp.com/large/23b350002d75566c95e6f.jpg',
                    video_url: 'https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200f970000bjdvcihpskdt8f7fivvg&line=0',
                }
            ],
        });
    }, 1000);


    render() {
        const { data } = this.state;
        return (
            <View style={styles.container}>
                <StatusBar
                    backgroundColor={'#000000'}
                    barStyle={'light-content'}
                />
                {/*<ShortVideoList*/}
                {/*    style={{ flex: 1 }}*/}
                {/*    source={[]}*/}
                {/*    onLoading={() => {*/}
                {/*        console.log('开始了');*/}
                {/*    }}*/}
                {/*    onPaused={() => {*/}
                {/*        console.log('暂停了');*/}
                {/*    }}*/}
                {/*    onShutdown={() => {*/}
                {/*        console.log('关掉了');*/}
                {/*    }}*/}
                {/*    onError={() => {*/}
                {/*        console.log('发生错误');*/}
                {/*    }}*/}
                {/*    onPlaying={() => {*/}
                {/*        console.log('正在播放');*/}
                {/*    }}*/}
                {/*/>*/}
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        flexDirection: 'column',
        backgroundColor: '#000000'
    },
});

